    /*  
    championBuilder - Champions Online character planner.
    Copyright (C) 2009 Moritz Hartmeier
    
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.
    
    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.
    
    You can find the GNU General Public License in the data folder.
    */


package ch.zarzu.champions.builder;

import ch.zarzu.util.CustomThread;

public class RootLauncher {
    // had to move this out of Main to allow the title bar to be set in OS X
    public static void main(String[] args) {
        String build = "";
        
        for(String s : args) {
            build = s;
        }
        
        // os x specific, move menu bar too the screen and set the name
        if (System.getProperty("os.name").toLowerCase().startsWith("mac")) {
            System.setProperty("apple.laf.useScreenMenuBar", "true"); 
            System.setProperty("com.apple.mrj.application.apple.menu.about.name", "ChampionBuilder");
            
            try {
                //UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
            } catch (Exception e) {
                
            }
        }
        
        new CustomThread<String>(build) {
            public void run() {
                Main main = Main.getInstance();
                main.createAndShowGUI(this.getData());
            }
        }.start();
    }
}
